Skip to content

Conversation

jamescrosswell
Copy link
Collaborator

@jamescrosswell jamescrosswell commented Sep 19, 2025

Resolves #4480:


Note

Skip emitting sentry.message.template in structured logs without parameters; adds coverage and updates changelog.

  • Structured Logs:
    • Update src/Sentry/SentryLog.cs to only write attributes.sentry.message.template when Template is set and Parameters has length > 0.
  • Tests:
    • Add WriteTo_NoParameters_NoTemplate theory in test/Sentry.Tests/SentryLogTests.cs to assert presence/absence of sentry.message.template based on parameters.
  • Docs/Changelog:
    • Update CHANGELOG.md under Fixes to note templates aren’t sent for logs without parameters.

Written by Cursor Bugbot for commit faad68a. This will update automatically on new commits. Configure here.

Copy link

codecov bot commented Sep 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.48%. Comparing base (2dc1551) to head (320d6d8).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4544      +/-   ##
==========================================
+ Coverage   73.33%   73.48%   +0.14%     
==========================================
  Files         479      482       +3     
  Lines       17509    17679     +170     
  Branches     3445     3495      +50     
==========================================
+ Hits        12840    12991     +151     
- Misses       3789     3798       +9     
- Partials      880      890      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell jamescrosswell marked this pull request as ready for review September 19, 2025 07:48
jamescrosswell and others added 2 commits September 28, 2025 16:35
cursor[bot]

This comment was marked as outdated.

This was referenced Oct 2, 2025
alexsohn1126 pushed a commit that referenced this pull request Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make sure the .NET SDK only sets sentry.message.template on logs if sentry.message.parameter values are also defined

3 participants